package com.ruoyi.mes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mes.mapper.EquipmentAssetsMapper;
import com.ruoyi.mes.domain.EquipmentAssets;
import com.ruoyi.mes.service.IEquipmentAssetsService;

/**
 * 设备资产管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-09
 */
@Service
public class EquipmentAssetsServiceImpl implements IEquipmentAssetsService 
{
    @Autowired
    private EquipmentAssetsMapper equipmentAssetsMapper;

    /**
     * 查询设备资产管理
     * 
     * @param assetId 设备资产管理主键
     * @return 设备资产管理
     */
    @Override
    public EquipmentAssets selectEquipmentAssetsByAssetId(Long assetId)
    {
        return equipmentAssetsMapper.selectEquipmentAssetsByAssetId(assetId);
    }

    /**
     * 查询设备资产管理列表
     * 
     * @param equipmentAssets 设备资产管理
     * @return 设备资产管理
     */
    @Override
    public List<EquipmentAssets> selectEquipmentAssetsList(EquipmentAssets equipmentAssets)
    {
        return equipmentAssetsMapper.selectEquipmentAssetsList(equipmentAssets);
    }

    /**
     * 新增设备资产管理
     * 
     * @param equipmentAssets 设备资产管理
     * @return 结果
     */
    @Override
    public int insertEquipmentAssets(EquipmentAssets equipmentAssets)
    {
        return equipmentAssetsMapper.insertEquipmentAssets(equipmentAssets);
    }

    /**
     * 修改设备资产管理
     * 
     * @param equipmentAssets 设备资产管理
     * @return 结果
     */
    @Override
    public int updateEquipmentAssets(EquipmentAssets equipmentAssets)
    {
        return equipmentAssetsMapper.updateEquipmentAssets(equipmentAssets);
    }

    /**
     * 批量删除设备资产管理
     * 
     * @param assetIds 需要删除的设备资产管理主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentAssetsByAssetIds(Long[] assetIds)
    {
        return equipmentAssetsMapper.deleteEquipmentAssetsByAssetIds(assetIds);
    }

    /**
     * 删除设备资产管理信息
     * 
     * @param assetId 设备资产管理主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentAssetsByAssetId(Long assetId)
    {
        return equipmentAssetsMapper.deleteEquipmentAssetsByAssetId(assetId);
    }
}
